import { S } from '../../s';
import { IPSAppDEMethodDTO } from './ipsapp-demethod-dto';
import { IPSAppDEMethodReturn } from './ipsapp-demethod-return';
import { IPSAppDataEntity } from './ipsapp-data-entity';
import { PSModelObjectImpl } from '../../psmodel-object-impl';

export class PSAppDEMethodReturnImpl
  extends PSModelObjectImpl
  implements IPSAppDEMethodReturn
{
  get codeName(): string {
    return this.M.codeName;
  }

  protected psappdemethoddto: IPSAppDEMethodDTO;
  getPSAppDEMethodDTO(): IPSAppDEMethodDTO | null {
    if (this.psappdemethoddto != null) return this.psappdemethoddto;
    const value = this.M.getPSAppDEMethodDTO;
    if (value == null) {
      return;
    }
    const ipsappdataentity = this.getParentPSModelObject(
      S._f,
    ) as IPSAppDataEntity;
    if (ipsappdataentity != null) {
      this.psappdemethoddto = ipsappdataentity.findPSAppDEMethodDTO(value);
    }
    return this.psappdemethoddto;
  }

  get stdDataType():
    | 0
    | 1
    | 2
    | 3
    | 4
    | 5
    | 6
    | 7
    | 8
    | 9
    | 10
    | 11
    | 12
    | 13
    | 14
    | 15
    | 16
    | 17
    | 18
    | 19
    | 20
    | 21
    | 22
    | 23
    | 24
    | 25
    | 26
    | 27
    | 28
    | 29 {
    return this.M.stdDataType != null ? this.M.stdDataType : 0;
  }

  get type():
    | 'VOID'
    | 'SIMPLE'
    | 'SIMPLES'
    | 'DTO'
    | 'DTOS'
    | 'PAGE'
    | 'ASYNCACTION'
    | 'SSE'
    | 'UNKNOWN'
    | 'USER'
    | 'USER2' {
    return this.M.type;
  }
  get cls(): string {
    return 'PSAppDEMethodReturnImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._3d2) return true;
    return super.instanceof(cls);
  }
}
